<?php
declare (strict_types=1);

use think\facade\Route;

/**
 * 试卷作答记录
 */
Route::group('admin/user/<user_id>', function () {
    // 列表
    Route::get('answerRecord', '@recordList');
})->prefix('\app\exam\service\admin\PaperAnswerRecord')
    ->middleware('adminRoute')
    ->pattern(['user_id' => '\d+']);

Route::group('admin/paper/<paper_id>', function () {
    // 列表
    Route::get('answerRecord', '@paperRecordList');
    // 导出选中的记录
    Route::post('record/export', '@exportRecord');
    // 导出试卷所有的记录
    Route::post('record/exports', '@exportRecords');
    // 试卷记录详情
    Route::get('record/<record_id>/details', '@recordDetails')->pattern(['record_id' => '\d+']);
})->prefix('\app\exam\service\admin\PaperAnswerRecord')
    ->middleware('adminRoute')
    ->pattern(['paper_id' => '\d+']);